BC API Basics

This page describes some basics of the Bridge Commander API.


App Module

All functions and objects that are owned by the game (C++) are wrapped within the App Python module. You'll typically want to import App at the top of each script you use. Classes, functions, and objects are referred to like so:

If you open the App.py script file, you'll see that it contains a ton of stuff. You can use it as an API reference for Bridge Commander -- if it's accessible from Python, it's in App.py, almost without exception.


Important Globals

There are a number of globals that are used fairly frequently in missions and in game scripts. Here are some of them. The first four are essential for building missions -- the others (and ones not mentioned here) would be used if you wanted to make other modifications to the game.


MissionLib

MissionLib is a Python script created to simplify some common mission tasks. It contains many, many useful functions. Like App, you'll want to import this in your mission scripts. A summary of some MissionLib functions is in the MissionLib API reference (incomplete).


Created on ... February 04, 2002